//
//  YCTitleContentConfig.m
//  TitleContent
//
//  Created by 唐可雄 on 2019/7/14.
//  Copyright © 2019 swustyc. All rights reserved.
//

#import "YCTitleContentConfig.h"

@implementation YCTitleContentConfig

- (instancetype)init {
    if (self = [super init]) {
        self.titleViewStyle = YCTitleViewStyleCollection;
        self.titleViewPos = YCTitleViewPosNormal;
        self.titleViewHeight = 40.f;
        self.titleViewBackgroundColor = [UIColor clearColor];
        self.collectionViewEdgeInsets = UIEdgeInsetsMake(0, 8, 0, 8);
        
        self.tintColorSegment = [UIColor blueColor];
        
        self.collectionViewCellAlignment = YCCollectionViewCellAlignmentLeft;
        self.collectionViewCellSpace = 0.f;
        self.collectionViewCellStyle = YCCollectionViewCellStyleText;
        self.titleCollectionViewCellWidth = 0;
        
        self.textColorSelected = [UIColor blackColor];
        self.textColorUnselected = [UIColor blackColor];
        self.textFontSelected = [UIFont systemFontOfSize:18];
        self.textFontUnselected = [UIFont systemFontOfSize:18];
        self.textVerAlignment = YCTextVerAlignmentCenter;
        
        self.lineViewWidth = 30.0f;
        self.lineViewHeight = 3.0f;
        self.lineViewBackgroundColor = [UIColor blueColor];
        self.lineViewShape = YCLineViewShapeRightRect;
        self.lineViewHidden = NO;
        self.lineViewAlignment = YCLineViewAlignmentBottom;
        self.lineViewTransitionType = YCLineViewTransitionTypePull;
        
        self.separatorViewColor = [UIColor blackColor];
        self.separatorViewHidden = NO;
        self.separatorViewHeight = 0.5f;
    }
    return self;
}

#pragma mark - NSCopying

- (id)copyWithZone:(NSZone *)zone {
    YCTitleContentConfig *config = [[[self class] allocWithZone:zone] init];
    config.titleViewPos = self.titleViewPos;
    config.titleViewStyle = self.titleViewStyle;
    config.titleViewHeight = self.titleViewHeight;
    config.titleViewBackgroundColor = self.titleViewBackgroundColor;
    config.collectionViewEdgeInsets = self.collectionViewEdgeInsets;
    
    config.collectionViewCellAlignment = self.collectionViewCellAlignment;
    config.collectionViewCellSpace = self.collectionViewCellSpace;
    config.collectionViewCellStyle = self.collectionViewCellStyle;
    
    config.tintColorSegment = self.tintColorSegment;
    config.textColorSelected = self.textColorSelected;
    config.textColorUnselected = self.textColorUnselected;
    config.textFontSelected = self.textFontSelected;
    config.textFontUnselected = self.textFontUnselected;
    config.textVerAlignment = self.textVerAlignment;
    
    config.lineViewWidth = self.lineViewWidth;
    config.lineViewHeight = self.lineViewHeight;
    config.lineViewBackgroundColor = self.lineViewBackgroundColor;
    config.lineViewHidden = self.lineViewHidden;
    config.lineViewShape = self.lineViewShape;
    config.lineViewAlignment = self.lineViewAlignment;
    config.lineViewTransitionType = self.lineViewTransitionType;
    
    config.separatorViewColor = self.separatorViewColor;
    config.separatorViewHidden = self.separatorViewHidden;
    config.separatorViewHeight = self.separatorViewHeight;
    return config;
}

@end
